package com.example.demo.controller

import com.example.demo.service.DeviceCommandService
import com.example.demo.service.MqttService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiSort
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController


@RestController
@RequestMapping("/medical")
@Api(tags = ["Mqtt接口"])
@ApiSort(value = 5)
class MqttController @Autowired constructor(
        private val mMQService: DeviceCommandService
) {


    @ApiOperation(value = "门口屏屏首页")
    @PostMapping("/send")
    fun send(roomCode: String) {
       mMQService.openGate(roomCode)
    }



}